/*
 * Use studuino for analog datalogger
 *
 * This program records by 2 bytes (16 bits) in EEPROM.
 * At first, this program initializes EEPROM by 0xffff.
 * As the analogRead function returns 10 bit, 
 * the number of recorded sensor value can decide by checking initialize value(0xffff).
 * 
 */
#include "Arduino.h"
#include "EEPROM.h"

// Convert Studuino's sensor pin to const value
#define A1	1
#define A2	2
#define A3	3
#define A4	4
#define A5	5
#define A6	6
#define A7	7

// Sensor ID
#define ULTRASONIC	4

const byte LEDPin  = 13;     // Monitoring Pin
const byte TrigPin = 14;     // Data logging & Ultra sonic sensor tigger pin
const byte EchoPin = 15;     // Ultra sonic sensor echo pin

int addr = 0;           // EEPROM address
boolean firstFlag;      // Get the sensor vlue when Power ON
unsigned long prevREC;  // 
unsigned long prevLED;  // 
unsigned long current;  // Current time
int state = LOW;        // 

int measureUltrasonic(byte pinTrig, byte pinEcho );    // prototype

